h<html>
    <head>
        <title>Hello world</title>
        <script>
            function loaded(){
                var element = document.createElement("DataElement");
                element.setAttribute("text", document.getElementById("text").innerHTML);
                document.documentElement.appendChild(element);
                 
                var readEvt = document.createEvent("Events");
                readEvt.initEvent("ReadEvent", true, false);
                
                var pauseEvt = document.createEvent("Events");
                pauseEvt.initEvent("PauseEvent", true, false);
                
                var resumeEvt = document.createEvent("Events");
                resumeEvt.initEvent("ResumeEvent", true, false);
                
                var nextEvt = document.createEvent("Events");
                nextEvt.initEvent("NextEvent", true, false);
                
                document.getElementById("btnRead").addEventListener("click", function(){
                    element.dispatchEvent(readEvt);
                }, false);
                
                document.getElementById("btnPause").addEventListener("click", function(){
                    element.dispatchEvent(pauseEvt);
                }, false);
                
                document.getElementById("btnResume").addEventListener("click", function(){
                    element.dispatchEvent(resumeEvt);
                }, false);
                
                document.getElementById("btnNext").addEventListener("click", function(){
                    element.dispatchEvent(nextEvt);
                }, false);
            }
        </script>
    </head>
    <body onload="loaded();">
        <button id="btnRead">Read</button>
        <button id="btnPause">Pause</button>
        <button id="btnResume">Resume</button>
        <button id="btnNext">Next</button>
        <p id="text">
            German Chancellor Angela Merkel told Greece the sacrifices it makes toward cutting spending will pay off, an unpopular message to tens of thousands who protested her visit to the country.
            Merkel made her remarks after meeting Tuesday with conservative Greek Prime Minister Antonis Samaras in Athens.  Her five-hour stop in Greece was her first visit to the country since the eurozone crisis began several years ago.
            Thousands of police were spread throughout the capital to control more than 25,000 protesters.  Police briefly clashed with some demonstrators and detained at least 40 people.
        </p>
    </body>
</html>